<template>

  <div>
    <van-nav-bar title="身份认证" left-arrow @click-left="goback"/>
    <div>
      <div>
        <van-image @click="toCourierCertification"
                   src="https://yanshengci.oss-cn-beijing.aliyuncs.com/images/2024-08-26%20145600.png" width="100%"
                   height="100%"/>
      </div>
      <div>
        <van-image @click="toRealNameAuthentication"
                   src="https://yanshengci.oss-cn-beijing.aliyuncs.com/images/2024-08-26%20145830.png" width="100%"
                   height="100%"/>
      </div>
    </div>
  </div>
</template>
<script>


import axios from "axios";

let forms = null;
export default {
  name: "certification",

  data() {
    return {
      login: null,
    }
  },
  methods: {
    goback() {
      this.$router.go(-1);
    },
    toRealNameAuthentication() {
      if (this.login.realNameStatus === 2 || this.login.realNameStatus === 3) {
        this.$router.push({
          path: '/realNameAuthentication'
        })
      } else {
        this.$router.push({
          path: '/realNameInformation'
        })
      }

    },
    toCourierCertification() {
      if (this.login.expressAuthStatus === 2 || this.login.expressAuthStatus === 3) {
        this.$router.push({
          path: '/courierCertification'
        })
      } else {
        this.$router.push({
          path: '/courierCertificationInformation'
        })
      }

    },
  },
  created() {
    this.login = JSON.parse(localStorage.getItem('login'));
    axios.get('http://localhost:11219/express/express/user/getUserInfoLogin/' + this.login.registerIp).then(res => {
      if (res.data.code == 200) {
        this.login = res.data.data;
        localStorage.setItem('login', JSON.stringify(this.login));
      }
    })
  },

}


</script>
<style>
</style>
